home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume10 / pccurses14 / part06 < prev    next >
Encoding:
Text File  |  1990-01-19  |  33.7 KB  |  725 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v10i020: PCcurses v.1.4 part 6 of 7
  3. from: bl@infovox.se (Bj|rn Larsson)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 10, Issue 20
  7. Submitted-by: bl@infovox.se (Bj|rn Larsson)
  8. Archive-name: pccurses14/part06
  9.  
  10. # ----------------------------- cut here -----------------------------
  11. #! /bin/sh
  12. # This is a shell archive. Remove anything before the `cut' line,
  13. # then unpack by saving it into a file and typing `sh file'. The
  14. # archive ends by exit(0), so don't worry about trailing junk.
  15. #       (This is archive 6 in a series of 7).
  16. # Contents:
  17. #   curses.3
  18. #   readme.now
  19. # Wrapped by USER@MS-DOS --- Sun Jan 14 14:02:52 1990
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test -f curses.3 -a "${1}" != "-c" ; then 
  22.   echo Will not over-write existing file \"curses.3\"
  23. else
  24. echo Extracting - \"curses.3\"
  25. sed "s/^X//" >curses.3 <<'END_OF_curses.3'
  26. XCURSES(3)        MS-DOS Programmer's Manual          CURSES(3)
  27. X
  28. XNAME
  29. X   curses - screen/window management library
  30. X
  31. XDESCRIPTION
  32. X   Curses is a library of screen and window management routines. It is modeled
  33. X   after the UNIX curses and ncurses libraries. Normally, programs written for
  34. X   PCcurses should be easily ported to UNIX, and vice versa.
  35. X
  36. X   To use the routines, the function initscr() must first be called. This cre-
  37. X   ates two 'windows' for the user: stdscr and curscr. Stdscr is the default
  38. X   window for the user to make changes on, and curscr reflects the current
  39. X   contents of the physical display screen. The user writes or edits the std-
  40. X   scr window to his liking, then calls the refresh() function to make curscr
  41. X   and the physical screen look like stdscr. When the user program terminates,
  42. X   it should call the endwin() function to restore things to normal.
  43. X
  44. X   There are all sorts of window manipulation routines available to the pro-
  45. X   grammer: auxiliary windows may be created, edited, moved and deleted. The
  46. X   terminal may be set in many different modes, output text may be attributed
  47. X   with blink, blank, bold and reverse attributes. There are window-specific
  48. X   printf- and scanf-like routines, routines for scrolling, box-drawing, win-
  49. X   dow overlaying, clearing routines etc. Curses also handles terminal func-
  50. X   tion keys, which is enables by calling the keypad() function.
  51. X
  52. X   The handling of character attributes is different on MGA, CGA and Hercules
  53. X   adapters. The package has been tested with them all. EGA has not been tes-
  54. X   ted, but should also work except for special screen modes.
  55. X
  56. X   For more and detailed information, see the library source codes. All curses
  57. X   functions are preceded by a brief but complete description.
  58. X
  59. XCOMPILING
  60. X   All programs that use curses facilities should include the file <curses.h>,
  61. X   and during linking, the library ?curses.lib should be specified to the lin-
  62. X   ker ('?' is 's', 'c' 'm' or 'l' for small, compact, medium or large memory
  63. X   model respectively).
  64. X
  65. XFUNCTIONS
  66. X   Below is a list over the available functions, together with a brief de-
  67. X   scription of what they do. In general, functions whose names start with
  68. X   'w' differ from the one without 'w' (like wmove vs. move) signify that
  69. X   a specific window is used. Without a 'w', sdtscr is implied. The functions
  70. X   that start with 'mv' before the 'genereic' function name signify that a
  71. X   cursor motion should be made before the actual work. 'mv' and 'w' combine
  72. X   as expected.
  73. X
  74. X   Most routines that return an int will return the manifest constant ERR if
  75. X   there is a failure during execution. Routines that return a char actually
  76. X   return an int, so that ERR does not conflict with the character code 0xff.
  77. X   All IBM PC characters from 0 to 0xff are allowed for usage with curses.
  78. X   There are (non-portable) character output routines to write the special
  79. X   IBM fonts for characters with ASCII code less than 0x20 (control charac-
  80. X   ters).
  81. X
  82. X   Some routines, like {mv}{w} printw() and {mv}{w}scanw() return a meaningful
  83. X   positive value if the operation is successful.
  84. X
  85. X   The curses package uses some predefined types, variables and manifest con-
  86. X   stants that are also available to the programmer. For example, the ERR and
  87. X   OK macros should be used to test for failure of curses functions. Don't use
  88. X   the numerical values, since those are different for different versions of
  89. X   curses!
  90. X
  91. X   There are also a few globally accessible variables that should not be tou-
  92. X   ched by the application program. Those untouchable variables have names
  93. X   starting with an underscore (_) to avoid conflicts. The user-accessible
  94. X   types, variables and constants are (there are a number of other constants
  95. X   defining character attribute names and function key names - consult the
  96. X   <curses.h> and <curspriv.h> include files for details):
  97. X
  98. X   (manifest constants)
  99. X
  100. X       TRUE                boolean true
  101. X    FALSE                boolean false
  102. X    ERR                unsuccessfull operation
  103. X    OK                successfull operation
  104. X
  105. X   (types)
  106. X
  107. X       WINDOW                a window structure type
  108. X    bool                boolean flag type
  109. X
  110. X   (variables)
  111. X
  112. X       WINDOW curscr            physical display image
  113. X    WINDOW stdscr            default user drawing board
  114. X       int    LINES            terminal height
  115. X    int    COLS            terminal width
  116. X
  117. X   The following is an alphabetical list of the curses functions, together
  118. X   with their types, parameters and a short comment for each. Win is a win-
  119. X   dow; ch, l, r, t, b, tl, tr, bl and br are characters; buf is a character
  120. X   buffer; attrs is an attribute bit map; bf is a boolean flag. Note that
  121. X   `character' return values in this context usually are 16 bits. Guaranteed
  122. X   portable functions are marked with an asterisk (*):
  123. X
  124. X
  125. X*  int   addch(ch)            put char in stdscr
  126. X   int     addrawch(ch)            put raw char in stdscr
  127. X*  int     addstr(str)            put string in stdscr
  128. X   void     attroff(attrs)            clear attribute(s) in stdscr
  129. X   void     attron(attrs)            add attribute(s) in stdscr
  130. X   void     attrset(attrs)            set stdscr char attributes
  131. X   int     baudrate()            dummy for compatibility
  132. X   void     beep()                ring the bell
  133. X   void     border(l,r,t,b,tl,tr,bl,br)    Set non-std box characters
  134. X*  void     box(win,l,t)            box in a window, with given characters
  135. X*  void     cbreak()            set terminal cbreak mode
  136. X*  void     clear()            clear stdscr
  137. X*  void     clearok(win,bf)        marks window for screen clear
  138. X*  int     clrtobot()            clear end of stdscr
  139. X*  int     clrtoeol()            clear end of line in stdscr
  140. X*  void     crmode()            set terminal cbreak mode
  141. X   void     cursoff()            turns off hardware cursor
  142. X   void     curson()            turns on hardware cursor
  143. X   void     def_prog_mode()        save TTY modes
  144. X   void     def_shell_mode()        compatibility dummy
  145. X*  int     delch()            delete a char in stdscr
  146. X*  int     deleteln()            delete a line in stdscr
  147. X*  void     delwin(win)            delete a window or a subwindow
  148. X   void     doupdate()            update physical screen
  149. X*  void     echo()                set terminal echo mode
  150. X*  int     endwin()            cleanup and curses finitialization
  151. X*  void     erase()            erase stdscr
  152. X   int     erasechar()            return char delete character
  153. X   int     fixterm()            dummy for compatibility
  154. X   void     flash()            flash terminal screen
  155. X   void  flushinp()            kill pending keyboard input
  156. X*  int     getch()    (#def macro)    get character via stdscr
  157. X*  int     getstr(buf)            get string via stdscr to a buffer
  158. X*  void     getyx(win,y,x)            get a window's cursor position
  159. X*  int     gettmode()            dummy for compatibility
  160. X   void     idlok(win,bf)            dummy for compatibility
  161. X*  int     initscr()            curses initialization (ret 1 if OK)
  162. X*  int     inch()                get char at stdscr cursor
  163. X*  int     insch(ch)            insert character in stdscr
  164. X   int     insrawch(ch)            insert raw character in stdscr
  165. X*  int     insertln()            insert an empty line in stdscr
  166. X   void     keypad(win,bf)            marks a window for keypad usage
  167. X   int   killchar()            return line delete character
  168. X*  void     leaveok(win,bf)        marks window for cursor 'update leave'
  169. X*  char *longname()            returns terminal description string
  170. X   void  meta(win,bf)            marks window for meta (dummy function)
  171. X*  int     move(y,x)            move cursor in stdscr
  172. X*  int     mvaddch(y,x,ch)        move & put char in stdscr
  173. X   int     mvaddrawch(y,x,ch)        move & put raw char in stdscr
  174. X*  int     mvaddstr(y,x,str)        move & put string in stdscr
  175. X   int     mvclrtobot(y,x)        move & clear end of stdscr
  176. X   int     mvclrtoeol(y,x)        move & clear lineend in stdscr
  177. X*  int     mvcur(oldy,oldx,y,x)        move terminal cursor to <y,x>
  178. X*  int     mvdelch(y,x)            move & delete a char in stdscr
  179. X   int     mvdeleteln(y,x)        move & delete a line in stdscr
  180. X*  int     mvgetch(y,x)            move & get char to stdscr
  181. X*  int     mvgetstr(y,x,buf)        move & get string via stdscr to buffer
  182. X*  int     mvinch(y,x,)            move & get char at stdscr cursor
  183. X*  int     mvinsch(y,x,ch)        move & insert char in stdscr
  184. X   int     mvinsrawch(y,x,ch)        move & insert raw char in stdscr
  185. X   int     mvinsertln(y,x)        move & insert new line in stdscr
  186. X*  int     mvprintw(y,x,fmt,args)        move & print string in stdscr
  187. X*  int     mvscanw(y,x,fmt,args)        move & get values via stdscr
  188. X*  int     mvwaddch(win,y,x,ch)        move & put char in a window
  189. X   int     mvwaddrawch(win,y,x,ch)    move & put raw char in a window
  190. X*  int     mvwaddstr(win,y,x,str)        move & put string in a window
  191. X   int     mvwclrtobot(win,y,x)        move & clear end of a window
  192. X   int     mvwclrtoeol(win,y,x)        move & clear lineend in a window
  193. X*  int     mvwdelch(win,y,x)        move & delete a char in a window
  194. X   int     mvwdeleteln(win,y,x)        move & delete a line in a window
  195. X*  int     mvwgetch(win,y,x)        move & get char to a window
  196. X*  int     mvwgetstr(win,y,x,str)        move & get string to a window
  197. X*  int     mvwinch(win,y,x)        move & get char at window cursor
  198. X*  int     mvwinsch(win,y,x,ch)        move & insert char in a window
  199. X   int     mvwinsrawch(win,y,x,ch)    move & insert raw char in a window
  200. X   int     mvwinsertln(win,y,x)        move & insert new line in window
  201. X   int     mvwin(win,y,x)            move window on physical screen
  202. X*  int     mvwprintw(win,x,y,fmt,args)    move & print string in a window
  203. X*  int     mvwscanw(win,y,x,fmt,args)    move & get values via a window
  204. X*  WINDOW *newwin(lines,cols,begy,begx)    create a new window
  205. X*  void     nl()                set terminal cr-crlf mapping mode
  206. X*  void     nocbreak()            unset terminal cbreak mod
  207. X*  void     nocrmode()            unset terminal cbreak mode
  208. X   void     nodelay(win,bf)        marks window for no input wait
  209. X*  void     noecho()            unset terminal echo mode
  210. X*  void     nonl()                unset terminal cr-crlf mapping mode
  211. X*  void     noraw()            unset raw terminal mode
  212. X*  void     overlay(win1,win2)        overlay one window on another
  213. X*  void     overwrite(win1,win2)        overwrite one window on another
  214. X*  int     printw(fmt,args)        print string in stdscr
  215. X*  void     raw()                set raw terminal mode
  216. X   void     refrbrk(bf)            set screen update break mode
  217. X*  void     refresh()            refresh stdscr
  218. X   int     resetterm()            dummy for compatibility
  219. X*  int     resetty()            restore terminal I/O modes
  220. X   void     reset_prog_mode()        restore terminal I/O modes
  221. X   void     reset_shell_mode()        set terminal to default modes
  222. X   int     saveoldterm()            dummy for compatibility
  223. X   int     saveterm()            dummy for compatibility
  224. X*  int     savetty()            save terminal I/O modes
  225. X*  int     scanw(fmt,args)        get values via stdscr
  226. X*  void     scroll(win)            scroll scrolling region of a window
  227. X*  void     scrollok(win,bf)        marks a window to allow scroll
  228. X   int     setscrreg(miny,maxy)        define stdscr's scroll region
  229. X*  int     setterm()            dummy for compatibility
  230. X   int     setupterm(term,fd,errret)    set up terminal (no-op on PC)
  231. X*  void     standend()            start normal chars in stdscr
  232. X*  void     standout()            start standout chars in stdscr
  233. X*  WINDOW *subwin(win,lines,cols,begy,begx) create a sub-window in window win
  234. X   int     tabsize(ts)            set/get tabsize of stdscr
  235. X*  void     touchwin(win)            mark a window as totally modified
  236. X*  char    *unctrl(ch)            char-to-string converter
  237. X   int     ungetch(ch)    (#def macro)    push back a character to input */
  238. X*  int     waddch(win,ch)            put char in a window
  239. X   int     waddrawch(win,ch)        put raw char in a window
  240. X*  int     waddstr(win,str)        put string in a window
  241. X   void     wattroff(win,attrs)        clear attribute(s) in window
  242. X   void     wattron(win,attrs)        add attribute(s) in window
  243. X   void     wattrset(win,attrs)        set window char attributes
  244. X   void     wborder(win,l,r,t,b,tl,tr,bl,br) Set non-std box characters
  245. X   int     wbox(win,miny,minx,maxy,maxx,l,r) draw a box inside a window
  246. X*  void     wclear(win)            clear a window
  247. X*  int     wclrtobot(win)            clear end of a window
  248. X*  int     wclrtoeol(win)            clear end of line in a window
  249. X*  int     wdelch(win)            delete a char in a window
  250. X*  int     wdeleteln(win)            delete a line in a window
  251. X*  void     werase(win)            erase a window
  252. X*  int     wgetch(win)            get char via a window
  253. X*  int     wgetstr(win,buf)        get string via window to a buffer
  254. X*  int     winch(win)            get char at window cursor
  255. X*  int     winsch(win,ch)            insert character in a window
  256. X   int     winsrawch(win,ch)        insert raw character in a window
  257. X*  int     winsertln(win)            insert new line in a window
  258. X*  int     wmove(win,y,x)            move cursor in a window
  259. X   void     wnoutrefresh(win)        create internal screen image
  260. X*  int     wprintw(win,fmt,args)        print string in a window
  261. X*  void     wrefresh(win)            refresh window
  262. X*  int     wscanw(win,fmt,args)        get values via a window
  263. X   int     wsetscrreg(win,miny,maxy)    define a window's scrolling region
  264. X*  void     wstandend(win)            start normal chars in window
  265. X*  void     wstandout(win)            start standout chars in window
  266. X   int     wtabsize(win,ts)        set/get tabsize of a window
  267. X   int     wungetch(ch)            push back a character to input */
  268. X
  269. XMISSING FUNCTIONS
  270. X
  271. X   The following functions existing in UNIX cursees are missing in PCcurses:
  272. X
  273. X   getcap(nam)                get terminal capability 'name'
  274. X
  275. XFUNCTIONS UNIQUE TO PCcurses
  276. X
  277. X   The following functions are (to the author's knowledge) unique to PCcurses:
  278. X
  279. X   int     addrawch(ch)            put raw char in stdscr
  280. X   int     waddrawch(win,ch)        put raw char in a window
  281. X   int     mvaddrawch(y,x,ch)        move & put raw char in stdscr
  282. X   int     mvwaddrawch(win,y,x,ch)    move & put raw char in a window
  283. X   int   insrawch(ch)            insert raw character in stdscr
  284. X   int   winsrawch(win,ch)        insert raw character in a window
  285. X   int     mvinsrawch(y,x,ch)        move & insert raw char in stdscr
  286. X   int     mvwinsrawch(win,y,x,ch)    move & insert raw char in a window
  287. X   int   tabsize(ts)            set/get tabsize of stdscr
  288. X   int     wtabsize(win,ts)        set/get tabsize of a window
  289. X
  290. XSEE ALSO
  291. X   "Screen Updating And Cursor Movement Optimization: A Library Package" -
  292. X   Kenneth C.R.C. Arnold
  293. X   "The Ncurses Reference Manual" - Pavel Curtis, Cornell University
  294. X
  295. XBUGS
  296. X   The terminal raw I/O mode is implemented by reading characters directly
  297. X   from the BIOS. This means that the programmer must not use the normal
  298. X   I/O routines to the screen or from the keyboard, since they will trap the
  299. X   MS-DOS ^C, ^S, ^Q and ^P characters and thus nullify the raw input.
  300. X
  301. X   Also, if the terminal is in normal or cbreak mode and the programmer has
  302. X   trapped CTRL-BREAK by using signal(SIGINT,ownhandler), MS-DOS will still
  303. X   echo the characters '^C' on the screen when the character is intercepted.
  304. X   There seems to be no way to avoid this under MS-DOS (use raw mode in-
  305. X   stead, or redraw the whole screen).
  306. X
  307. X   The function key support is hardware dependent. There is a table in char-
  308. X   get.c that maps keyboard scan codes from the keyboard to function key
  309. X   names. The one supplied works for IBM PC/XT/AT, and for most clones.
  310. X
  311. XREVISION
  312. X   The current revision is v.1.4 (900114). If you find or correct bugs, or if
  313. X   you think up or implement enhancements, please contact the author. That way
  314. X   he can maintain an 'official' version of PCcurses, without too many local
  315. X   versions floating around.
  316. X
  317. XAUTHOR
  318. X   Home:       Bjorn Larsson        Work:    INFOVOX AB
  319. X           Ynglingagatan 5,IV            Box 2503
  320. X           S-113 47 Stockholm            S-171 02 Solna
  321. X           SWEDEN                SWEDEN
  322. X
  323. X           UseNet: bl@infovox.se
  324. END_OF_curses.3
  325. if test 14592 -ne `wc -c <curses.3`; then
  326.     echo \"curses.3\" unpacked with wrong size!
  327. fi
  328. # end of overwriting check
  329. fi
  330. if test -f readme.now -a "${1}" != "-c" ; then 
  331.   echo Will not over-write existing file \"readme.now\"
  332. else
  333. echo Extracting - \"readme.now\"
  334. sed "s/^X//" >readme.now <<'END_OF_readme.now'
  335. X               PCCURSES v.1.4 Release Notes - 900114
  336. X    ===================================================
  337. X
  338. X  This is the release note for the fifth version of PCcurses, v.1.4.
  339. XBelow this note, the release notes for v.1.0 - v.1.3 are included. Read
  340. Xthose first.
  341. X
  342. X  In PCcurses v.1.4, both portability improvements and bugfixes have
  343. Xbeen made. The files have been changed to allow lint-free compilation
  344. Xwith MicroSoft 'C' v.5.1, and with Turbo 'C' v.2.0. The source should
  345. Xstill compile without problems on older compilers, although this has
  346. Xnot been verified.
  347. X
  348. X  The makefiles have been changed to suit both the public release and
  349. Xthe author, who maintains a special kind of libraries for himself. In
  350. Xthe case of MicroSoft 'C', changes were done in the makefile to lower
  351. Xthe warning level to 2 (was 3). This was to avoid ANSI warnings which
  352. Xare abundant because PCcurses does not attempt to follow strict ANSI
  353. X'C' standard.
  354. X
  355. X  BUG FIXES FROM V.1.3 TO V.1.4:
  356. X
  357. X  !!!IMPORTANT CHANGE!!!
  358. X
  359. X  The definitions for OK and ERR in curses.h were exchanged. This was
  360. Xdone to be more consistent with UNIX versions. Also, it permits func-
  361. Xtions like newwin() and subwin() to return 0 (=NULL) when they fail
  362. Xdue to memory shortage. This incompatibility with UNIX curses was
  363. Xpointed out by Fred C. Smith. If you have tested success/failure by
  364. Xcomparisons to anything other than ERR and OK, your applications will
  365. Xneed to be be changed on that point. Sorry... but presumably most of
  366. Xyou used the symbolic constants?
  367. X
  368. X  (END OF IMPORTANT CHANGE)
  369. X
  370. X  Fred also pointed out a bug in the file update.c. The bug caused the
  371. Xfirst character printed after 'unauthorized' screen changes (like du-
  372. Xring a shell escape, for example) to be placed at the wrong screen posi-
  373. Xtion. This happened even if the normal precautions (clear / touch / re-
  374. Xfresh) were taken. The problem has now been fixed.
  375. X
  376. X  PCcurses is currently also being used on a 68000 system with hard-
  377. Xcoded ESCape sequences for ANSI terminals. However, int's used by the
  378. X68000 C compiler are 32 bits. Therefore int's have been turned into
  379. Xshort's wherever possible in the code (otherwise all window structures
  380. Xoccupy twice as much space as required on the 68000). This does not
  381. Xaffect PC versions since normally both int's and short's are 16 bits
  382. Xfor PC C compilers.
  383. X
  384. X  At some places in the source code there are references made to the
  385. X68000 version. There are also a makefile, a curses68.c file, and a
  386. Xcurses68.cmd file. These are for making, low-level I/O, and linking
  387. Xcommands when building the 68000 version. These files are probably
  388. Xuseful to no-one but the author, since it is very specific for it's
  389. Xspecial hardware environment. Still in an effort to keep all curses-
  390. Xrelated sources in one place they are included. Note however that
  391. XPCcurses will not officially support a non-PC environment.
  392. X
  393. X  The file cursesio.c, which was included in the package at revision
  394. Xlevel 1.2, and which was to be an alternative to the cursesio.asm
  395. Xfile, has been verified to behave incorrectly in the function
  396. X_curseskeytst(). The problem was that the value of 'cflag' does not
  397. Xcontain the proper data for the test that is attempted. Furthermore,
  398. Xneither Turbo'C' or MicroSoft'C' allows any way to return the data
  399. Xthat is needed, and consequently you should not use cursesio.c. The
  400. Xbest solution is to simply use the ASM version. In v.1.2 and v.1.3,
  401. Xthe user could edit the makefile to select which version he wanted to
  402. Xuse. The makefiles in v.1.4 have removed this possiblity forcing the
  403. Xuse of the ASM file, and cursesio.c has been dropped from the distri-
  404. Xbution.
  405. X
  406. X  A bug in the wgetstr() function caused PCcurses to echo characters
  407. Xwhen reading a keyboard string, even if the echo had been turned off.
  408. XThanks to Per Foreby at Lund University, Sweden, for this. Per also
  409. Xreported bugs concerning the handling of characters with bit 8 set.
  410. XTheir ASCII code were considered as lower than 32, so they were
  411. Xerased etc. like control characters, i.e. erasing two character posi-
  412. Xtions. The control character test was changed to cope with this.
  413. X
  414. X  The overlay() and overwrite() functions were changed so that the
  415. Xoverlaying window is positioned at it's 'own' coordinates inside the
  416. Xunderlying window (it used to be at the underlying window's [0,0]
  417. Xposition). There is some controversy about this - the documentation
  418. Xfor different curses versions say different things. I think the
  419. Xchoice made is the most reasonable.
  420. X
  421. X  The border() and wborder() functions were changed to actually draw
  422. Xa border, since this seems to be the correct behaviour of these func-
  423. Xtions. They used to just set the border characters to be used by
  424. Xbox(). These functions are  not present in standard BSD UNIX curses.
  425. X
  426. X  The subwin() function previously did not allow the subwindow to be
  427. Xas big as the original window in which it was created. This has now
  428. Xbeen fixed. There was also the problem that the default size (set by
  429. Xspecifying numlines or numcols (or both) as 0 made the resulting
  430. Xactual size 1 line/column too small.
  431. X
  432. X  There were a few spelling errors in function names, both in the
  433. Xfunction declarations and in curses.h. This was reported by Carlos
  434. XAmaral at INESC in Portugal. Thanks! There was also an unnecessary
  435. X(but harmless) parameter in a function call at one place.
  436. X
  437. X
  438. X
  439. X               PCCURSES v.1.3 Release Notes - 881005
  440. X    ===================================================
  441. X
  442. X  This is the release note for the fourth version of PCcurses, v.1.3.
  443. XBelow this note, the release notes for v.1.0, v.1.1 and v.1.2 are in-
  444. Xcluded. Read those first.
  445. X
  446. X  The file 'border.c' is now included. It allows you to explicitely speci-
  447. Xfy what characters should be used as box borders when the box() functions
  448. Xare called. If the new border characters are non-0, they override the bor-
  449. Xder characters specified in the box() call. In my understanding, this func-
  450. Xtionality is required for AT&T UNIX sV.3 compatibility. Thanks for this
  451. Xgoes to Tony L. Hansen (hansen@pegasus.UUCP) for posting an article about
  452. Xit on UseNet (newsgroup comp.unix.questions; his posting was not related
  453. Xat all to PCcurses).
  454. X
  455. X  The only other difference between v.1.2 and v.1.3 is that the latter has
  456. Xbeen changed to avoid warning diagnostics if the source files are compiled
  457. Xwith warning switches on (for MicroSoft this means '-W3', for Turbo'C' it
  458. Xmeans '-w -w-pro'). Of these, the Turbo'C' warning check is clearly to be
  459. Xused rather than MicroSoft, even if neither of them comes even close to a
  460. Xreal UNIX 'lint'. Some of the warnings in fact indicated real bugs, mostly
  461. Xfunctions that did not return correct return values or types.
  462. X
  463. X  The makefiles for both MSC and TRC have been modified to produce warning
  464. Xmessages as part of normal compilation.
  465. X
  466. X
  467. X
  468. X
  469. X               PCCURSES v.1.2 Release Notes - 881002
  470. X    ===================================================
  471. X
  472. X  This is the release note for the third version of PCcurses, v.1.2.
  473. XBelow this note, the release notes for v.1.0 and v.1.1 are included. Read
  474. Xthose first.
  475. X
  476. X  The changes from v.1.1 to v.1.2 are minor. The biggest change is that there
  477. Xwas a bug related to limiting the cursor movement if the application tried to
  478. Xmove it outside the screen (something that should not be done anyway). Such
  479. Xerronous application behaviour is now handled appropriately.
  480. X
  481. X  All modules have been changed to have a revison string in them, which makes
  482. Xit easier to determine what version is linked into a program (or what library
  483. Xversion you have).
  484. X
  485. X  There is now a 'cursesio.c' file. That file does the same as 'cursesio.asm'
  486. X(i.e. it provides the interface to the lower-level system I/O routines). It
  487. Xis written in 'C' and thus it is (possibly) more portable than the assembler
  488. Xversion (but still not so portable since it uses 8086 INT XX calls directly).
  489. XWhen one creates new curses libraries, one chooses whether to use the assem-
  490. Xbler or the 'C' version of cursesio. The choice is made by commenting out the
  491. Xappropriate dependencies for cursesio.obj, near the end of the makefiles.
  492. X
  493. X  There is now a 'setmode.c' file. That file contains functions that save and
  494. Xrestore terminal modes. They do it into other variables than do savetty() and
  495. Xresetty(), so one should probably use either savetty()/resetty() or the new
  496. Xfunctions only - and not mix the both ways unless one really knows what one
  497. Xdoes.
  498. X
  499. X  Diff lists vs v.1.0 are no longer included in the distribution. The make
  500. Xutility still is. PCcurses v.1.2 still compiles with MicroSoft 'C' v.4.0,
  501. Xand with Borland Turbo 'C' v.1.0. There is as far as I know no reason to be-
  502. Xlieve that it does not compile under MicroSoft 'C' v.3.0 and 5.x, or Turbo-
  503. X'C' v.1.5, but this has not been tested.
  504. X
  505. X  There are two makefile's included, one for MicroSoft 'C', one for Turbo-'C'.
  506. XThey are both copies of my personal makefile's, and as such they reflect the
  507. Xdirectory structure on my own computer. This will have to be changed before
  508. Xyou run make. Check $(INCDIR) and $(LIBDIR) in particular, and make the choice
  509. Xof ASM or 'C' cursesio version as mentioned above (the distribution version
  510. Xuses the 'C version of cursesio).
  511. X
  512. X  The manual file (curses.man) has been changed at appropriate places.
  513. X
  514. X  I would like to thank the following persons for their help:
  515. X
  516. X      Brandon S. Allbery (alberry@ncoast.UUCP)
  517. X        for running comp.binaries.ibm.pc (at that time)
  518. X        and comp.source.misc.
  519. X
  520. X    Steve Balogh (Steve@cit5.cit.oz.AU)
  521. X          for writing a set of manual pages and posting
  522. X        them to the net.
  523. X
  524. X    Torbjorn Lindh
  525. X        for finding bugs and suggesting raw
  526. X        character output routines.
  527. X
  528. X    Nathan Glasser (nathan@eddie.mit.edu)
  529. X          for finding and reporting bugs.
  530. X
  531. X    Ingvar Olafsson (...enea!hafro!ingvar)
  532. X          for finding and reporting bugs.
  533. X
  534. X    Eric Rosco (...enea!ipmoea!ericr)
  535. X          for finding and reporting bugs.
  536. X
  537. X    Steve Creps (creps@silver.bacs.indiana.edu)
  538. X          for doing a lot of work - among others
  539. X        posting bug fixes to the net, and writing
  540. X        the new cursesio.c module.
  541. X
  542. X    N. Dean Pentcheff (dean@violet.berkeley.edu)
  543. X          for finding bugs and rewriting cursesio.asm
  544. X        for Turbo 'C' 1.5.
  545. X
  546. X  Finally, Jeff Dean (parcvax,hplabs}!cdp!jeff)
  547. X               (jeff@ads.arpa)
  548. X    has had a shareware version of curses deliverable since
  549. X    about half a year before I released PCcurses 1.0 on Use-
  550. X    Net. He is very concerned about confusion between the two
  551. X    packages, and therefore any references on the network
  552. X    should make clear whether they reference Dean's PCcurses
  553. X    or Larsson's PCcurses.
  554. X
  555. X
  556. X
  557. X               PCCURSES v.1.1 Release Notes - 880306
  558. X    ===================================================
  559. X
  560. X  This is the release note for the second version of PCcurses, v.1.1.
  561. XBelow this note, the release note for v.1.0 is included. Read that first.
  562. XThe changes from v.1.0 to v.1.1 are minor. There are a few bug fixes, and
  563. Xnew (non-portable) functions for verbatim IBM character font display have
  564. Xbeen added (in charadd.c and charins.c). The manual file (curses.man) has
  565. Xbeen changed at appropriate places.
  566. X
  567. X  In the file v10tov11.dif there are listings of the differencies between
  568. Xversion 1.0 and 1.1. The diff listings are in UNIX diff(1) format.
  569. X
  570. X  Version 1.1 compiles with Turbo 'C' v.1.0, as well as MicroSoft 'C' v.3.0
  571. Xand v.4.0. On the release disk there is a make.exe utility which is very simi-
  572. Xlar to UNIX make (If the package was mailed to you, the make utility will be
  573. Xin uuencoded format - in make.uu - and must be uudecoded first). It is much
  574. Xmore powerful than MicroSoft's different MAKE'S; the latter ones will NOT ge-
  575. Xnerate libraries properly if used with the PCcurses makefiles.
  576. X
  577. X  There are three makefiles:
  578. X
  579. X    makefile        generic MSC 3.0 makefile
  580. X    makefile.ms        MSC 4.0 makefile
  581. X    makefile.tc        Turbo 'C' 1.0 makefile
  582. X
  583. X  To make a library with for example Turbo 'C', make directories to hold .H
  584. Xand .LIB files (these directories are the 'standard places'), edit makefile.tc
  585. Xfor this, and type
  586. X
  587. X    make -f makefile.tc all
  588. X
  589. Xand libraries for all memory models will be created in the .LIB directory,
  590. Xwhile the include files will end up in the .H directory. Also read what is
  591. Xsaid about installation below!
  592. X
  593. X
  594. X
  595. X
  596. X               PCCURSES v.1.0 Release Notes - 870824
  597. X    ===================================================
  598. X
  599. X
  600. X
  601. X  This is the release notes for the PCcurses v.1.0 cursor/window control
  602. Xpackage. PCcurses offers the functionality of UNIX curses, plus some
  603. Xextras. Normally it should be possible to port curses-based programs from
  604. XUNIX curses to PCcurses on the IBM PC without changes. PCcurses is a port/
  605. Xrewrite of Pavel Curtis' public domain 'ncurses' package. All the code has
  606. Xbeen re-written - it is not just an edit of ncurses (or UNIX curses). I
  607. Xmention this to clarify any copyright violation claims. The data struc-
  608. Xtures and ideas are very similar to ncurses. As for UNIX curses, I have
  609. Xnot even seen any sources for it.
  610. X
  611. X For an introduction to the use of 'curses' and it's derivatives, you
  612. Xshould read 'Screen Updating and Cursor Movement Optimization: A Library
  613. XPackage' by Kenneth C. R. C. Arnold, which describes the original Berkely
  614. XUNIX version of curses. It is available as part of the UNIX manuals. The
  615. Xother source of information is 'The Ncurses Reference Manual' by Pavel
  616. XCurtis. The latter is part of Curtis' ncurses package.
  617. X
  618. X  The only other documentation provided is a 'man' page which describes
  619. Xall the included functions in a very terse way. In the sources, each
  620. Xfunction is preceded by a rather thourough description of what the
  621. Xfunction does. I didn't have time to write a nice manual/tutorial - sorry.
  622. X
  623. X  PCcurses is released as a number of source files, a man page, and a make
  624. Xfile. A uuencoded copy of a 'make' utility, and a manpage for the 'make' is
  625. Xalso provided to make it easier to put together PCcurses libraries. Even if
  626. Xyou are not interested in PCcurses, it may be worthwhile to grab the make.
  627. X
  628. X  The makefile assumes the presence of the MicroSoft 'C' compiler (3.0 or
  629. X4.0), MicroSoft MASM and LIB, plus some MS-DOS utilities. The reason for
  630. Xsupplying MAKE.EXE is that the MicroSoft 'MAKE:s' are much inferior to a
  631. Xreal UNIX make. The supplied make is a port of a public domain make, pub-
  632. Xlished on UseNet. It is almost completely compatible with UNIX make. When
  633. Xgenerating the curses libraries, the makefile will direct make to do some
  634. Xdirectory creating and file copying, and then re-invoke itself with new
  635. Xtargets. The workings of the makefile are not absolutely crystal clear at
  636. Xfirst sight... just start it and see what it does.
  637. X
  638. X  For portability, the curses libraries depend on one assembler file for
  639. Xaccess to the BIOS routines. There is no support for the EGA, but both
  640. XCGA, MGA, and the HGA can be used. The libraries are originally for Micro-
  641. XSoft 'C', but all C modules should be portable right away. In the assembler
  642. Xfile, segment names probably need to be changed, and possibly the parameter
  643. Xpassing scheme. I think Turbo C will work right away - as far as I under-
  644. Xstand, all it's conventions are compatible with MicroSoft C.
  645. X
  646. X  There are some parts left out between ncurses and PCcurses. One is the
  647. Xsupport for multiple terminals - not very interesting on a PC anyway. Be-
  648. Xcause we KNOW what terminal we have, there is no need for a termcap or
  649. Xtermio library. PCcurses also has some things that neither curses nor
  650. Xncurses have. Compared to the original UNIX curses, PCcurses has lots
  651. Xof extras.
  652. X
  653. X  The BIOS routines are used directly, which gives fast screen updates.
  654. XPCcurses does not do direct writes to screen RAM - in my opinion it is
  655. Xa bit ugly to rely that much on hardware compatibility. Anyone could fix
  656. Xthat, of course...
  657. X
  658. X  One of the more serious problems with PCcurses is the way in which nor-
  659. Xmal, cbreak, and raw input modes are done. All those details are in the
  660. X'charget' module - I do raw I/O via the BIOS, and perform any buffering
  661. Xmyself. If an application program uses PCcurses, it should do ALL it's
  662. XI/O via PCcurses calls, otherwise the mix of normal and PCcurses I/O may
  663. Xmess up the display. I think my code is reasonable... comments are welcome,
  664. Xprovided you express them nicely...
  665. X
  666. X  To install, copy all files to a work directory, edit 'makefile' to define
  667. Xthe standard include and library file directory names of your choice (these
  668. Xdirectories must exist already, and their path names must be relative to the
  669. Xroot directory, not to the current one). You must also run uudecode on
  670. Xmake.uu, to generate MAKE.EXE. You can do that on your PC, if you have
  671. Xuudecode there, otherwise you can do it under UNIX and do a binary transfer
  672. Xto the PC. When you have MAKE.EXE in your work directory (or in your /bin
  673. Xdirectory), type make.
  674. X
  675. X  Make will now create 4 sub-directories (one for each memory model), copy
  676. Xsome assembler include files into them, copy two include files to your
  677. Xinclude directory, CHDIR to each sub-directory and re-invoke itself with
  678. Xother make targets to compile and assemble all the source files into the
  679. Xappropriate directories. Then the library manager is run to create the
  680. Xlibrary files in your desired library directory. Presto!
  681. X
  682. X  If you only want to generate a library for one memory model, type 'make
  683. Xsmall', 'make large', etc. The name of the memory model must be in lower
  684. Xcase, like in the makefile.
  685. X
  686. X  I think the package is fairly well debugged - but then again, that's
  687. Xwhat I always think. It was completed in May-87, and no problems found
  688. Xyet. Now it's your turn... Comments, suggestions and bug reports and
  689. Xfixes (no flames please) to
  690. X
  691. XBjorn Larsson
  692. XINFOVOX AB
  693. XBox 2503                    (bl@infovox.se)
  694. XS-171 02 Solna
  695. XSWEDEN
  696. END_OF_readme.now
  697. if test 17453 -ne `wc -c <readme.now`; then
  698.     echo \"readme.now\" unpacked with wrong size!
  699. fi
  700. # end of overwriting check
  701. fi
  702. echo End of archive 6 \(of 7\).
  703. cp /dev/null archdone.6
  704. MISSING=""
  705. for I in 1 2 3 4 5 6 7 ; do
  706.     if test ! -f archdone.${I} ; then
  707.     MISSING="${MISSING} ${I}"
  708.     fi
  709. done
  710. if test "${MISSING}" = "" ; then
  711.     echo You have unpacked all 7 archives.
  712.     rm -f archdone.[1-9]
  713. else
  714.     echo You still need to unpack the following archives:
  715.     echo "        " ${MISSING}
  716. fi
  717. ##  End of shell archive.
  718. exit 0
  719.  
  720.